package com.example.wificon;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import comm.savagelook.android.*;

import com.example.wificon.R;

public class Home extends Activity {
	Button login;
	Button register;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home);
        login = (Button) findViewById(R.id.login_open);
        login.setOnClickListener(new View.OnClickListener() {
    	 
        	/*public void onCreate(Bundle savedInstanceState) {
		    super.onCreate(savedInstanceState);
		    setContentView(R.layout.activity_welcome);

		   
		        	

	    findViewById(R.id.loginButton).setOnClickListener(
	        new View.OnClickListener() {
	            @Override
	            public void onClick(View v) {
	                // Existing Account, load login view
	                Intent intent = new Intent(WelcomeActivity.this,
	                    LoginActivity.class);
	                startActivityForResult(intent, 0);
	            }
	        });
		        *
		        *
		        */
			@Override
			public void onClick(View arg0) {
				Intent intent;
				
				intent = new Intent("com.example.wificon.LOG_IN");
				startActivity(intent);
			}
		});
        register = (Button) findViewById(R.id.register_home);
        register.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // No account, load new account view
                Intent intent = new Intent(Home.this,
                    Register.class);
                startActivityForResult(intent, 0);
            }
        });
    }
    
    public void runGoogle(View view){
    	  Intent intent = new Intent(Home.this,
                  GoogleMaps.class);
              startActivityForResult(intent, 0);
    }
   // private void loadTasksFromAPI(String url) {
   //     GetTasksTask getTasksTask = new GetTasksTask(Home.this);
   //     getTasksTask.setMessageLoading("Loading tasks...");
   //     getTasksTask.execute(url + "?auth_token=" + mPreferences.getString("AuthToken", ""));
  //  }

}
